<?php
/**
 * | ---------------------------------------------------------------------------------------------------
 * | Author：johnxu <fsyzxz@163.com>.
 * | ---------------------------------------------------------------------------------------------------
 * | Home: https://www.johnxu.net.
 * | ---------------------------------------------------------------------------------------------------
 * | Data: 2018/12/31
 * | ---------------------------------------------------------------------------------------------------
 * | Desc: 异步执行命令，类似shell_exec
 * | ---------------------------------------------------------------------------------------------------
 */

\Swoole\Async::exec( 'ps aux', function ( $result, $status ) {
    var_dump( strlen( $result ), $status );
} );
